<?php
/**
 * 登錄頁
 * @author user zhukoo
 *
 */
class Login extends Service {
	
	/**
	 * 默認method
	 * @param array $param
	 */
	public function run($param = ''){}
	
	/**
	 * 表單提交,登錄檢查
	 * @param array $param
	 */
	public function form($param = ''){
		if(!empty($param)&&is_array($param)){
			$user = ZKF::model('Zpdo');
			$_return = $user->table('user')->where('username="'.$param['username'].'" and password="'.md5('zkf'.$param['password']).'"')->count();
			ZKF::session('verify',0,0);
			return empty($_return)?array('info'=>'登錄失敗，用戶名或密碼錯誤！','status'=>'n'):array('info'=>'恭喜你，登錄成功！','status'=>'y');
		}
	}
}
?>